﻿CREATE TABLE [dbo].[Players] (
    [Id]               INT             NOT NULL,
    [Login]            NVARCHAR (200)  NOT NULL,
    [Picture]          VARBINARY (MAX) NULL,
    [LodzOfficeRoomId] INT             NOT NULL,
    [AccountPoints]    INT             NOT NULL,
    [IsAdmin]          BIT             CONSTRAINT [DF_Players_IsAdmin] DEFAULT ((0)) NOT NULL,
    [InsertUser]       NVARCHAR (MAX)  NOT NULL,
    [InsertDate]       DATETIME        NOT NULL,
    [UpdateUser]       NVARCHAR (MAX)  NULL,
    [UpdateDate]       DATETIME        NULL,
    [Deleted]          BIT             NOT NULL,
    CONSTRAINT [PK_dbo.Players] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_dbo.Players_dbo.LodzOfficeRooms_LodzOfficeRoomId] FOREIGN KEY ([LodzOfficeRoomId]) REFERENCES [dbo].[LodzOfficeRooms] ([Id]) ON DELETE CASCADE
);



